package com.jf3q.sup.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 
 * @TableName purchases
 */
@TableName(value ="purchases")
@Data
public class Purchases implements Serializable {
    /**
     * 采购ID,主键,自增
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 供应商ID,外键参考供应商表
     */
    private Integer supplierId;

    /**
     * 采购日期
     */
    private Date purchaseDate;

    /**
     * 采购总金额
     */
    private BigDecimal totalAmount;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createdAt;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date updatedAt;

    /**
     * 审核状态
     */
    private Integer status;

    @TableField(exist = false)
    private List<PurchaseDetails> purchaseDetailsList;

    @TableField(exist = false)
    private String sname;//供应商名字



    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}